from datetime import datetime, timedelta
from typing import Optional

# 固定密码和token值
FIXED_PASSWORD = "admin123"
FIXED_TOKEN = "fixed_token_123"

def verify_password(plain_password: str, hashed_password: str) -> bool:
    return plain_password == FIXED_PASSWORD

def get_password_hash(password: str) -> str:
    return FIXED_PASSWORD

def create_access_token(data: dict, expires_delta: Optional[timedelta] = None) -> str:
    return FIXED_TOKEN

def verify_token(token: str) -> Optional[dict]:
    if token == FIXED_TOKEN:
        return {"sub": "admin", "exp": datetime.utcnow() + timedelta(days=1)}
    return None 